//888888888888888888888888888888888888888888888888888888888888888888888888888888888888888
//
//	File		 :	AnnotateSequence.h
//	Contents	 :	Header file for functions annotating protein sequences
//						links functionality from parseMSF.h and FormattedOutput.h
//	Creation Date:	23/12/1999
//	Last Modified:	24/12/1999	lg
//	tabs width	 :	every 4 characters
//
//888888888888888888888888888888888888888888888888888888888888888888888888888888888888888

#if !defined(ANNOTATESEQUENCE_H)
#define ANNOTATESEQUENCE_H


#include "parse.h"
#include "set32byte.h"
#include <vector>
class CFormattedOutput;
struct CSequence;
#include "annotateoptions.h"

// convenient typedefs
typedef std::vector<std::string>					CStrVec;
typedef std::vector<CSet32Short>					CSetsVec;

//_______________________________________________________________________________________
//
//			Annotates amino acid sequences at consensus positions
//			Forwards to the other functions declared in this file to do the actual work.
//			NB consensusThreshold is in 10 * percent
//			The form of the annotated output is determined by the concrete type
//				of "outputEngine" (e.g. RTF, HTML etc. engines can be constructed.)
//
//_______________________________________________________________________________________
void 	CreateAnnotation(	//inputs
					    const CStrVec& aminoAcidSets,
					    const std::string& markers,
					    const std::string& invalidAAs,
					    const CAnnotateOptions& opt,
						bool  chkAAIdentity,
						bool  allowLowerCase,
						// outputs
						CSequence& sequence,
						CSequence& formatSequence);


void OutputAnnotatedSequence(const CSequence& sequence,
							 const CSequence& formatSequence,
							 unsigned wrap,
							 unsigned columnW,
							 CFormattedOutput& OutputEngine);
void OutputAnnotatedSequence(	const std::vector<CSequence>& sequences,
							    const std::vector<CSequence>& formatSequences,
							    unsigned wrap,
							    unsigned columnW,
							    CFormattedOutput& OutputEngine);

CSequence::eFormatType GuessAlignmentFileFormat(char* buf, unsigned bufLen);
bool ParseAlignmentFromBuffer(char* buf, CParseMessageCallback& callback, CSequence& sequence, const CParseOptions& options);
void CreateMultiSequences(std::vector<int>& indices, const CSequence originalSeq, std::vector<CSequence>& vecSeq);


#endif // !defined(ANNOTATESEQUENCE_H)
